<div class="fm-content">
  <!-- 最上面标题栏 -->
  <div class="title">
    <i nz-icon [type]="'desktop'"></i>
    &nbsp;&nbsp;公司空防安全
  </div>
  <!-- 内容 -->
  <div class="work">

    <!-- 查询框 -->
    <div class="top">
      <!-- first-input -->
      <nz-select class="fm-input first-input" (nzOpenChange)="airportDic.load('0')"
        [(ngModel)]="fs.queryObject['airport:=']" [nzPlaceHolder]="'所属机场'">
        <nz-option *ngFor="let option of airportDic.datas" [nzLabel]="option.display" [nzValue]="option.id">
        </nz-option>
        <nz-option *ngIf="airportDic.isLoading" nzDisabled nzCustomContent>
          <i nz-icon type="loading" class="loading-icon"></i>加载中...
        </nz-option>
      </nz-select>
      <nz-button-group>
        <button nz-button nzType="primary" (click)="fs.loadData(true)">查询</button>
        <button nz-button (click)="fs.resetQueryObject() && fs.loadData(true)">重置</button>
      </nz-button-group>
      <div class="tool-right">
        <nz-button-group>
          <button *ngIf="ss.mi.sa || ss.mi.gskfaqxz" nz-button [nzType]="'primary'" (click)="editRow(null)">新增</button>
          <!-- <button nz-button (click)="fs.editRow()">编辑</button> -->
          <button *ngIf="ss.mi.sa || ss.mi.gskfaqsc" nz-popconfirm nzTitle="确认删除选择项?" (nzOnConfirm)="fs.delEntitys()" nzPlacement="bottomRight"
            nz-button>删除</button>
          <a nz-button href="assets/images/公司空防安全.xls" download="公司空防安全.xls">模板下载</a>
          <button nz-button (click)="fs.export('xjmh_gskf.html', '公司空防安全.xls')">导出</button>
          <nz-upload nzAction="{{ fs.getExcelUploadUrl() }}" [nzLimit]="1" [nzHeaders]="ffs.fileHeaders"
                     [nzFilter]="fs.excelFilters" [nzAccept]="'.xls,.xlsx'" (nzChange)="excelHandleChange($event)">
            <button *ngIf="ss.mi.sa || ss.mi.gskfaqxz" nz-button>导入</button>
          </nz-upload>
        </nz-button-group>
      </div>
    </div>

    <!-- 右则样表单主体 -->
    <div class="work-content">
      <div class="table">
        <nz-table nzSize="middle" nzBordered nzShowSizeChanger [nzPageSizeOptions]='[ 10, 15, 20, 30, 40, 50 ]'
          [nzFrontPagination]="false" [nzData]="fs.datas" [nzLoading]="fs.isLoading || fs.isDeleing"
          [nzTotal]="fs.rowsCount" [(nzPageIndex)]="fs.pageIndex" [(nzPageSize)]="fs.pageSize"
          (nzPageIndexChange)="fs.loadData()" (nzPageSizeChange)="fs.loadData(true)">
          <thead>
            <tr>
              <th rowspan="3" nzShowCheckbox [(nzChecked)]="fs.allChecked" [nzIndeterminate]="fs.indeterminate"
                (nzCheckedChange)="fs.checkAll($event)"></th>
              <th rowspan="3" [nzAlign]="'center'">所属机场</th>
              <th colspan="7">空中安保</th>
              <th>空地联动</th>
            </tr>
            <tr>
              <th colspan="7">空警、安全员保障航班情况</th>
              <th rowspan="2">机组报警（次）</th>
            </tr>
            <tr>
              <th>派遣空警、安全员（人次）</th>
              <th>航空数量（班次）</th>
              <th>飞行时长（小时）</th>
              <th>处置机上非法干扰行为（件次）</th>
              <th>处置机上扰乱行为（件次）</th>
              <th>协助押解犯罪嫌疑人（人次）</th>
              <th>境外遣返人员数量（人次）</th>
            </tr>
          </thead>
          <tbody>
            <tr *ngFor="let data of fs.datas">
              <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="fs.refreshCheckStatus()">
              </td>
              <!-- <td><span (click)="fs.editRow(data)" class="form-edit"></span></td> -->
              <td [nzAlign]="'center'"><span (click)="editRow(data)" class="form-edit">{{data.airportName}}</span></td>
              <td>{{data.sendperson}}</td>
              <td>{{data.flightcount}}</td>
              <td>{{data.flyingtime}}</td>
              <td>{{data.illegalevent}}</td>
              <td>{{data.disturbevent}}</td>
              <td>{{data.helpescort}}</td>
              <td>{{data.returnperson}}</td>
              <td>{{data.afalarm}}</td>
            </tr>
          </tbody>
        </nz-table>
      </div>
    </div>
  </div>
</div>
